Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qu Mingsi] iP #468

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

[Qu Mingsi] iP #468

wants to merge 48 commits into from

Conversation

e0316059
Copy link

No description provided.

* this method handles two types of error: invalid input (does not contain todo/deadline/event)
* and empty task (if the input starts with todo/deadline/event and the content is not empty,
* it is assumed that the input has correct structure)
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per iP task on code quality, should the JavaDoc contain descriptions on the input parameter?

}
}

private static void readFile() throws FileNotFoundException {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per iP task on code quality, should this function be accompanied with a JavaDoc?

Copy link

@AudreyFelicio AudreyFelicio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the code looks good and well structured 😃.
Only some small improvements needed.
Great job!

Comment on lines 18 to 19
return "[D]" + super.toString() + "(by: " +
time.format(DateTimeFormatter.ofPattern("MMM d yyyy HH:mm")) + ")";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standard, should the + after "(by: " be on the second line instead of the first line?

Comment on lines 18 to 19
return "[E]" + super.toString() + "(at: " +
time.format(DateTimeFormatter.ofPattern("MMM d yyyy HH:mm")) + ")";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standard, should the + after "(at: " be on the second line instead of the first line?

}

/**
* this method handles two types of error: invalid input (does not contain todo/deadline/event)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standards, should the javadoc header comment start in the form of Handles ...?

try {
writeToFile(tasks);
} catch (IOException e) {
ui.showIOException(e);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standards, should the method name showIOException be showIoException?

System.out.println("File not found");
}

public static void showIOException(IOException e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standards, should the method name showIOException be showIoException?

Comment on lines +1 to +3
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standards, should import static org.junit.jupiter.api.Assertions.assertEquals; be put above import org.junit.jupiter.api.Test;? The same comment for all other classes that have those two imports.

Comment on lines +12 to +14
public LocalDateTime getTime() {
return this.time;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the module's coding standards, should a javadoc comment exist above the method? The same comment for all other public methods.

public void testSetDone(){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm");
Event event = new Event("return book", LocalDateTime.parse("2000-01-01 2359", formatter));
assertEquals(false, event.getStatus());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use assert(!event.getStatus()); here as well, just to make the code slightly cleaner, similar comment for line 20. The rest looks good, great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants